package com.xxl.job.admin.dao;

import com.xxl.job.admin.core.model.CronJob;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author wenhonghao
 * @email 18167784149@163.com
 * @description: 初始化定时任务Dao
 */
@Mapper
public interface InitCrontabServiceDao {

    void insert(CronJob cronJob);

    void update(CronJob cronJob);

    // 根据服务器ID和任务命令查找定时任务
    Integer findByServerIdAndCommand(@Param("serverId") int serverId,
                                     @Param("command") String command,
                                     @Param("schedule") String schedule,
                                     @Param("serverUser") String serverUser);

}
